#include <iostream>
using namespace std;

int main(int argc, char * argv[])
{
  int A;
  int B;
  int C;
  std::cin >> A >> B >> C;
  std::cout << ((((A < 0)&&(B < 0))&&(C > 0))||(((A < 0)&&(C < 0))&&(B > 0))||(((B < 0)&&(C < 0))&&(A > 0)));
}